import React, { Component } from 'react';
import {Title1} from "./style"

class FilmList extends Component {


    goto=(id)=>{
        this.props.history.push(`/detail/${id}`) 
    }

    render() {

        return (
            <Title1 onClick={()=>this.goto(this.props.filmId)}>
                <div className='left'><img src={this.props.poster}/></div>
                <div className='zhong'>
                    <h4>{this.props.name}<span>{this.props.filmType.name}</span></h4>
                    <p>观众评分<span>{this.props.grade}</span></p>
                    <p>主演：{this.props.actors.map(val=>" "+val.name + " ")}</p>
                    <p>{this.props.nation}|{this.props.runtime}分钟</p>
                </div>
                <div className='right'>
                    <p className='text'>购票</p>
                </div>
            </Title1>
        );
    }
}

export default FilmList;
